<?php

class LanguageController extends Zend_Controller_Action
{
	public function indexAction()
	{
		$this->_redirect("/product/index");
	}

	public function changeLanguageAction()
	{
		$lang = $this->getRequest()->getParam("lang");
		switch ($lang)
		{
			case 'en': $langId = 1;break;
			case 'vn': $langId = 2;break;
		}
		My_Translate::setLanguage($langId);
		
		$action = $this->getRequest()->getParam("act");
		$control = $this->getRequest()->getParam("ctrl");
		$this->_redirect("/$control/$action");exit;
	}

	

}